package nc;
import java.util.*;

public class _360 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt(), M = sc.nextInt(), K = sc.nextInt();
        int[] dis = new int[N];
        int[] money = new int[N];
        for (int i = 0; i < N; i++) {
            dis[i] = sc.nextInt();
            money[i] = sc.nextInt();
        }
        sc.close();
        long sum = money[0];
        int[][] f = new int[N][K];

        System.out.println(sum);
    }
}
